import { Button } from "cc";
import { IViewCtrl, TViewConfig, ViewId, ViewLayer } from "../../frame/common/view/IView";
import { ViewCtrlBase } from "../../frame/common/view/ViewCtrlBase";
import { DemoView } from "./DemoView";






export class DemoViewCtrl extends ViewCtrlBase implements IViewCtrl {

    static viewConfig: TViewConfig = {
        id: ViewId.DEMO,
        name: "DemoView",
        bundle: "demo",
        prefab: "DemoView",
        layer: ViewLayer.FULL,
        atlasArr: []
    }

    listClickButtons(): Button[] {
        return [this.view.btn_test1];
    }
    listViewNodeEvent(): string[] {
        return null;
    }
    listGlobalEvent(): string[] {
        return null;
    }

    parseDep(): void {

    }

    get view(): DemoView {
        return this.node.getComponent(DemoView) as DemoView;
    }

    test1(): void {
        console.log('...... test11  ....... ', 111);
    }

    dispose(): void {
        
    }
}

